package com.citywithincity.api.entities;

import java.io.Serializable;
import java.util.Map;

/**
 * customer
 * @author Randy
 *
 */
public class Customer implements Serializable {
	
	public static final int ANDROID = 1;
	
	public static final int IOS = 2;
	
	public static final int WX = 3;
	
	public static final int WEB = 4;
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 9096103948224830183L;

	@Override
	public String toString() {
		return account;
	}
	
	/**
	 * 自动编号
	 */
	private Long id;
	/**
	 * 账号
	 */
	private String account;
	/**
	 * 设备号
	 */
	private String device;
	
	/**
	 * 操作系统
	 */
	private int platform;
	
	/**
	 * 版本号
	 */
	private int versionCode;
	
	
	/**
	 * token
	 */
	private String token;
	/**
	 * 签名key
	 */
	private String key;
	/**
	 * 加密key
	 */
	private String pinKey;
	/**
	 * 渠道
	 */
	private String channel;
	/**
	 * 其他数据
	 */
	private Map<String, Object> extra;

	public String getChannel() {
		return channel;
	}
	
	public String getRawPinKey(){
		return pinKey;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public byte[] getPinKey() {
		return pinKey.getBytes();
	}

	public void setPinKey(String pinKey) {
		this.pinKey = pinKey;
	}

	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Map<String, Object> getExtra() {
		return extra;
	}

	public void setExtra(Map<String, Object> extra) {
		this.extra = extra;
	}

	public int getPlatform() {
		return platform;
	}

	public void setPlatform(int platform) {
		this.platform = platform;
	}

	public int getVersionCode() {
		return versionCode;
	}

	public void setVersionCode(int versionCode) {
		this.versionCode = versionCode;
	}
	
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	private String phone;

	
}
